package com.kate.cloud.shiro.exception;



import com.kate.cloud.shiro.enums.ResultEnum;
import lombok.Data;

/**
 * Created by 李金照 on 2017/12/13.
 *
 * @author 金照
 */
@Data
public class LoginException extends RuntimeException{
    private Integer code;

    public LoginException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public LoginException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
